import RNFS from 'react-native-fs';
import { isIOS } from '../../constant';

export const DOWNLOAD_PATH = `${
  isIOS ? RNFS.DocumentDirectoryPath : RNFS.ExternalDirectoryPath
}/videos`;

export enum VIDEO_TYPE {
  ld = 0,
  sd = 1,
  hd = 2
}

export const VIDEO_TYPE_DESC = ['ld', 'sd', 'hd'];

export const VIDEO_TYPE_NUMBER_DESC = ['270P', '480P', '720P'];

export const DOWNLOAD_VIDEO_START = 'downloadVideoStart';

export const DOWNLOAD_VIDEO_PROGRESS = 'downloadVideoProgress';

export const DOWNLOAD_VIDEO_SUCCESS = 'downloadVideoSuccess';

export const DOWNLOAD_VIDEO_PAUSE = 'downloadVideoPause';

export const DOWNLOAD_VIDEO_DELETE = 'downloadVideoDelete';

export const DOWNLOAD_VIDEO_FAIL = 'downloadVideoFail';

export const M3U8_FAIL_LIMIT = 10;

export const TS_FAIL_LIMIT = 200;

export const MOST_TASK_NUM = 2;

export const GET_VIDEO_TOKEN_DEV = 'http://devapi.mifengxiaoban.com/v2/video/get/';

export const GET_VIDEO_TOKEN_PROD = 'https://api.mifengxiaoban.com/v2/video/get/';
